package com.sqx.modules.course.controller;

import com.sqx.common.utils.Result;
import com.sqx.modules.course.entity.AdsUnlockVideos;
import com.sqx.modules.course.service.AdsUnlockVideosService;
import com.sqx.modules.sys.controller.AbstractController;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@Api(value = "短剧广告解锁记录管理", tags = {"短剧广告解锁记录"})
@RequestMapping(value = "/adsUnlockVideos")
public class AdsUnlockVideosController extends AbstractController {

    @Autowired
    private AdsUnlockVideosService adsUnlockVideosService;

    @ApiOperation("短剧广告解锁记录列表")
    @GetMapping("/selAdsUnlockVideosList")
    public Result selAdsUnlockVideosList(@ApiParam("页")Long page, @ApiParam("条")Long limit){
        return adsUnlockVideosService.selAdsUnlockVideosList(page, limit);
    }


    @ApiOperation("短剧广告解锁记录详情")
    @GetMapping("/selAdsUnlockVideosDetail")
    public Result selAdsUnlockVideosDetail(@ApiParam("id")Long id){
        return adsUnlockVideosService.selAdsUnlockVideosDetail(id);
    }


    @ApiOperation("短剧广告解锁记录删除")
    @PostMapping("/delAdsUnlockVideos")
    public Result delAdsUnlockVideos(@ApiParam("id")Long id){
        return adsUnlockVideosService.delAdsUnlockVideos(id);
    }


    @ApiOperation("短剧广告解锁记录添加")
    @PostMapping("/addAdsUnlockVideos")
    public Result addAdsUnlockVideos(@RequestBody AdsUnlockVideos adsUnlockVideos){
        return adsUnlockVideosService.addAdsUnlockVideos(adsUnlockVideos);
    }


    @ApiOperation("短剧广告解锁记录修改")
    @PostMapping("/updateAdsUnlockVideos")
    public Result updateAdsUnlockVideos(@RequestBody AdsUnlockVideos adsUnlockVideos){
        return adsUnlockVideosService.updateAdsUnlockVideos(adsUnlockVideos);
    }

}
